import EchartsComponent, { MyChartOption } from '@/components/EchartsComponent';
import React from 'react';

type IProps = {
  powerChartInfo?: MyChartOption;
  isOldStation?: boolean;
};

const PowerChart: React.FC<IProps> = (props) => {
  const { powerChartInfo, isOldStation = false } = props;
  return (
    <div style={isOldStation ? {} : { marginTop: '-20px' }}>
      <EchartsComponent option={powerChartInfo} height={isOldStation ? '228px' : '20rem'} />
    </div>
  );
};

export default PowerChart;
